echo "1.prepare the env about docker..."
cd /root
export cur_path=$(realpath . | sed 's:/*$::')
apt-get update
apt-get install -y vim wget git cmake gcc python3 python3-pip jq
git config --global --add safe.directory $cur_path
git config --global user.name ${gitcode_username}
git config --global user.email "your@emaple.com"
git clone https://gitcode.com/openUBMC/openubmc-ci.git repo

pip config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple
pip3 install -r $cur_path/repo/ci-scripts/ci_template/prepare/requirements.txt
python3 $cur_path/repo/ci-scripts/ci_template/check/prepare_env_new.py --gitcode_username="${gitcode_username}" --gitcode_token="${gitcode_token}" --gitcode_domain="${gitcode_domain}" --code_path="source_code"
cd source_code

echo "2.prepare the env about docker..."
bash $cur_path/repo/ci-repos/%s/scripts/ipmi_check.sh ${gitcode_username} ${gitcode_token}